home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / _49 Text f199605232001.psc / nospaces.txt < prev   
Encoding:
Text File  |  2000-05-13  |  367 b   |  15 lines

  1. ' add a text box and place this in it. Rename text1 to the name
  2. ' of the text box.
  3.  
  4.     Dim Length As String
  5.     
  6.     For L = 1 To text1.MaxLength
  7.             
  8.         Length = Length + " "
  9.         If text1 = "" Or text1 = Length Then
  10.             MsgBox "You can't have spaces in this textbox!"
  11.             'Exit Sub
  12.     End If
  13.             
  14.     Next L
  15.